import React from 'react'
import { Form, Select } from 'antd'
import PropTypes from 'prop-types'
const { Item } = Form
const { Option } = Select
function Main ({ dictionary }) {
  const caseSourceList = dictionary['案件来源'] || []
  return (
    <Item label='案件来源' name='accept_structure'>
      <Select placeholder='请选择案件来源' allowClear>
        {caseSourceList.map(li => (
          <Option key={li.title} value={li.title}>{li.title}</Option>
        ))}
      </Select>
    </Item>
  )
}

Main.propTypes = {
  dictionary: PropTypes.object
}

Main.defaultProps = {
  dictionary: {}
}

export default Main
